from django.db import models

# Create your models here.


class Article(models.Model):
    title = models.CharField(max_length=32)
    imgSrc = models.CharField(max_length=128)
    avatar = models.CharField(max_length=128)
    content = models.TextField()
    reading = models.IntegerField()
    collection = models.IntegerField()
    headImgSrc = models.CharField(max_length=128)
    author = models.CharField(max_length=32)
    dateTime = models.CharField(max_length=32)
    detail = models.TextField()
    music = models.TextField()
    date = models.DateField(auto_now=True)


class MiniUser(models.Model):
    phoneNumber = models.CharField(max_length=11, verbose_name='手机号')
    userName = models.CharField(max_length=16, verbose_name='用户名')
    password = models.CharField(max_length=32, verbose_name='密码')
    nickName = models.CharField(max_length=16, verbose_name='昵称')
    birthday = models.DateField(auto_now=False, verbose_name='生日')
    address = models.CharField(max_length=128, verbose_name='地址')
    sex = models.IntegerField(verbose_name='性别（1男 2女 3未知）')
    email = models.CharField(max_length=32, verbose_name='邮箱')
    register_time = models.TimeField(auto_now=True, verbose_name='注册时间')
    status = models.IntegerField(verbose_name='状态 （1正常 2删除）')

